package lab02.test05;

public class Cube {
    //1.属性
    float length;
    float width;
    float height;
    float cubage;

    //2.行为

    public float getLength(float length) {
        return length;
    }

    public void setLength(float length) {
        this.length = length;
    }

    public float getWidth(float width) {
        return width;
    }

    public void setWidth(float width) {
        this.width = width;
    }

    public float getHeight(float height) {
        return height;
    }

    public void setHeight(float height) {
        this.height = height;
    }

    public void countCubage() {
        this.cubage = length * width * height;
        System.out.println("体积 = " + cubage);
    }


    //3.构造函数
    Cube() {}
}
